import { BrowserRouter as Router, Route, Switch, Link, useParams } from "react-router-dom";
export default function () {
    return (
        <Router>
            <div>
                <h2>Accounts</h2>
            </div>
            <ul>
                <li>
                    <Link to="/netfix">Netfix</Link>
                </li>
                <li>
                    <Link to="/zillow-group">Zillow Group</Link>
                </li>
                <li>
                    <Link to="/yahoo">yahoo</Link>
                </li>
                <li>
                    <Link to="/modus-create">Modus Create</Link>
                </li>
            </ul>
            <Switch>
                <Route path="/:id" children={<Child/>}></Route>
            </Switch>
        </Router>
    );
}

function Child(){
    let params = useParams();
    console.log("params:");
    console.log(params);
    return (
        <div>
            <h3>ID: {params.id}</h3>
        </div>
    );
}